/**
 * Generate time : 2011-06-28 13:50:27
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ca.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCA4100
 * 
 */
public class ZMCA4100 extends DaoEPBase {

	private String fdKeyId = " "; /* PrimaryKey */
	private String fdUserId = " "; /* 用户ID */
	private String fdInitialdatadetailId = " "; /* 配置信息ID */
	private String fdValue = " "; /* 配置信息索引值 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(64);
		eiColumn.setDescName("PrimaryKey");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdUserId");
		eiColumn.setFieldLength(64);
		eiColumn.setDescName("用户ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdInitialdatadetailId");
		eiColumn.setFieldLength(64);
		eiColumn.setDescName("配置信息ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdValue");
		eiColumn.setFieldLength(64);
		eiColumn.setDescName("配置信息索引值");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCA4100() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - PrimaryKey
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - PrimaryKey
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdUserId - 用户ID
	 * 
	 * @return the fdUserId
	 */
	public String getFdUserId() {
		return this.fdUserId;
	}

	/**
	 * set the fdUserId - 用户ID
	 */
	public void setFdUserId(String fdUserId) {
		this.fdUserId = fdUserId;
	}

	/**
	 * get the fdInitialdatadetailId - 配置信息ID
	 * 
	 * @return the fdInitialdatadetailId
	 */
	public String getFdInitialdatadetailId() {
		return this.fdInitialdatadetailId;
	}

	/**
	 * set the fdInitialdatadetailId - 配置信息ID
	 */
	public void setFdInitialdatadetailId(String fdInitialdatadetailId) {
		this.fdInitialdatadetailId = fdInitialdatadetailId;
	}

	/**
	 * get the fdValue - 配置信息索引值
	 * 
	 * @return the fdValue
	 */
	public String getFdValue() {
		return this.fdValue;
	}

	/**
	 * set the fdValue - 配置信息索引值
	 */
	public void setFdValue(String fdValue) {
		this.fdValue = fdValue;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUserId")), fdUserId));
		setFdInitialdatadetailId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdInitialdatadetailId")), fdInitialdatadetailId));
		setFdValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdValue")), fdValue));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdUserId", StringUtils.toString(fdUserId, eiMetadata.getMeta("fdUserId")));
		map.put("fdInitialdatadetailId", StringUtils.toString(fdInitialdatadetailId, eiMetadata.getMeta("fdInitialdatadetailId")));
		map.put("fdValue", StringUtils.toString(fdValue, eiMetadata.getMeta("fdValue")));

		return map;

	}
}